package com.taxi.remote;

import com.taxi.dto.Car;
import com.taxi.dto.DriverCarBindingRelationship;
import com.taxi.dto.DriverUser;
import com.taxi.dto.DriverUserWorkStatus;
import com.taxi.response.DriverUserExistsResponse;
import com.taxi.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: aniu
 * @Date: 2023/9/28
 * @ClassName: ServiceDriverUserClient
 * @Description: Write class functionality and purpose here.
 * @Version: 1.0
 */
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {
    @PostMapping("/user")
    public Result addOrUpdateDriverUser(@RequestBody DriverUser driverUser);

    @GetMapping("/get-driver-info/{driverId}")
    public Result<DriverUser> getDriverInfo(@PathVariable("driverId") Long driverId);

    @GetMapping("/check-driver/{driverPhone}")
    public Result<DriverUserExistsResponse> getUser(@PathVariable("driverPhone") String driverPhone);

    @GetMapping("/get-car/{cid}")
    public Result<Car> getCarById(@PathVariable("cid") Long cid);

    @PostMapping("/driver-user-work-status")
    public Result changeWorkStatus(@RequestBody DriverUserWorkStatus driverUserWorkStatus);

    @GetMapping("/driver-car-binding-relationship/{driverPhone}")
    public Result<DriverCarBindingRelationship> getDriverCarRelationShip(@PathVariable String driverPhone);

    @GetMapping("/work-status/{driverId}")
    public Result<DriverUserWorkStatus> getWorkStatus(@PathVariable Long driverId);
}
